-
Notifications
You must be signed in to change notification settings - Fork 21
chore: Python pagination support #733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Python pagination support #733
Conversation
| '{{{baseName}}}': {{#if vendorExtensions.x-serialize}}{{vendorExtensions.x-serialize}}({{paramName}}{{#if isArray}}, lambda e: e){{else}}){{/if}}{{else}}{{paramName}}{{/if}},{{/allParams}} | ||
| }){{/isApiV1}}{{^isApiV1}}{{#allParams}} | ||
| {{#startsWith paramName text='page_size'}}{{else}}{{paramName}}: Union[{{{dataType}}}, object] = values.unset,{{/startsWith}}{{/allParams}} | ||
| page_token: Union[str, object] = values.unset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider the case when page_token, page_size params are present in the spec file too, like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these params are supported for token paginations. see the generated file https://github.com/twilio/twilio-python/pull/906/changes#diff-b0150af2b6d9e9ad8b9c685530aae36aeb5f35a0a6b67be43a92c02124bb6c2aR174-R177
| }){{/isApiV1}}{{^isApiV1}}{{#allParams}} | ||
| {{#startsWith paramName text='page_size'}}{{else}}{{paramName}}: Union[{{{dataType}}}, object] = values.unset,{{/startsWith}}{{/allParams}} | ||
| page_token: Union[str, object] = values.unset, | ||
| page_number: Union[int, object] = values.unset, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ApiV1, Page number is not present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this case is for {{^isApiV1}} i.e existing functionality.
Fixes
A short description of what this PR does.
Checklist
make test-dockerpython scripts/build_twilio_library.py path/to/twilio-oai/spec/yaml path/to/twilio-java -l javaand inspect the diffmake testintwilio-javatwilio-javaIf you have questions, please create a GitHub Issue in this repository.